// 拿app.js里面定义的全局应用程序对象
const app =getApp();
// 只能用相对路径引用
var postsData=require('../../data/postData.js')
Page({
  data: {
    imgUrls: ['http://img06.tooopen.com/images/20160818/tooopen_sy_175833047715.jpg',
      'http://img06.tooopen.com/images/20160818/tooopen_sy_175866434296.jpg',
    ],
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.setData({
      postContent: postsData.postList
    })
  },
  toDetail:function(e){
    var postId=e.currentTarget.dataset.postid;
    wx.navigateTo({
      url: 'post-detail/post-detail?id='+postId
    })
  }

  
})